#include <iostream>


class TestAllocFree
{
public:
    TestAllocFree(const std::string& refName)
    {
        m_strName = refName;
        std::cout << __FUNCTION__ << ": " << m_strName << std::endl;
    }

    ~TestAllocFree()
    {
        std::cout << __FUNCTION__ << ": " << m_strName << std::endl;
    }
private:
    std::string m_strName;
};


TestAllocFree global_var("global_var");

void __Func()
{
    static TestAllocFree local_static_var("local_static_var");
    TestAllocFree local_var("local_var");
}

int main(int argc, char** argv)
{
    std::cout << __FUNCTION__ << "Enter" << std::endl;
    __Func();
    std::cout << __FUNCTION__ << "Exit" << std::endl;

    return 0;
}